#ifndef VISUALIZATIONELEMENT_H_INCLUDED
#define VISUALIZATIONELEMENT_H_INCLUDED

#include "ConfigElement.h"

#define VISUALIZATION_TAG   "visualization"
//Attributes of the "visualization" element
#define STEREO_ATTRIBUTE        "stereo"
#define NO_STEREO_VALUE         "off"
#define ACTIVE_STEREO_VALUE     "active"
#define DUAL_STEREO_VALUE       "dual"

#define FULLSCREEN_ATTRIBUTE    "fullscreen"
#define TRUE_VALUE              "true"
#define FALSE_VALUE             "false"

#define VIS_API_ATTRIBUTE       "api"
#define OPENGL_VALUE            "opengl"
#define DIRECTX_VALUE           "directx"

#define SCENE_ATTRIBUTE         "scene"



//Tags of the elements children of "visualization"
#define RESOLUTION_TAG          "resolution"
//Attributes of the "resolution" element
#define RES_WIDTH_ATTRIBUTE     "width"
#define RES_HEIGHT_ATTRIBUTE    "height"

namespace OpenNano
{
    enum Stereo_Type { NO_STEREO, ACTIVE, DUAL };

    class OPENNANO_EXPORT VisualizationElement : public ConfigElement
    {
       DECLARE_OBJECT_FACTORY( VisualizationElement );

        private:
            bool _fullscreen;
            int _screen_width, _screen_height;
            std::string _scene_filename;

            bool _resolution_processed;
            Stereo_Type _stereo;
            std::string _visAPI;
        protected:
            void attributeFound(TiXmlAttribute * attribute );
            void childElementFound( TiXmlElement * childElement );
            void textFound(const char * text);
            bool postConfiguration();
            void init();

        public:
            bool isFullscreen();
            const std::string& getVisualizationAPI() const;
            const std::string& getSceneFilename() const;
            void getResolution(int &width, int &height);
            Stereo_Type getStereoChoice();

    };

}



#endif // VISUALIZATIONELEMENT_H_INCLUDED
